package cool.gaogao.transactional.service;

import cool.gaogao.transactional.dao.AccountDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author 高山青
 * @Date 2021/12/31  -   21:45
 */
@Service("accountService")
@Transactional
public class AccountServiceImpl implements AccountService{

	@Autowired
	private AccountDao accountDao;


	@Override
	public void accountMoney() {

		accountDao.addMoney(100);
		int a=1/0;
		accountDao.updateMoney(100);

	}
}
